package com.learn.project2.controller.wx.brand;

import com.learn.project2.bean.MarketBrand;
import com.learn.project2.model.vo.wx.brand.BrandListVO;
import com.learn.project2.service.wx.brand.BrandService2;
import com.learn.project2.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:  品牌
 * @author 亓永杰
 * @date 2022年1月11日16:02:40
 * @version 1.0
 */
@RestController
@RequestMapping("wx/brand")
public class BrandController2 {

    @Autowired
    BrandService2 brandService2;

    @RequestMapping("list")
    public Result list(Integer page,Integer limit){
        BrandListVO brandListVO = brandService2.selectBrand(page,limit);
        return Result.ok(brandListVO);
    }

    @RequestMapping("detail")
    public Result detail(Integer id){
        MarketBrand marketBrand = brandService2.selectDetailBrand(id);
        return Result.ok(marketBrand);
    }
}
